3.9.18 \(\int \frac {(d \csc (e+f x))^n}{(3+3 \sin (e+f x))^2} \, dx\) [818]

3.9.18.1 Optimal result
3.9.18.2 Mathematica [F]
3.9.18.3 Rubi [A] (verified)
3.9.18.4 Maple [F]
3.9.18.5 Fricas [F]
3.9.18.6 Sympy [F]
3.9.18.7 Maxima [F]
3.9.18.8 Giac [F]
3.9.18.9 Mupad [F(-1)]

3.9.18.1 Optimal result

Integrand size = 23, antiderivative size = 222 \[ \int \frac {(d \csc (e+f x))^n}{(3+3 \sin (e+f x))^2} \, dx=-\frac {2 n \cot (e+f x) (d \csc (e+f x))^{2+n}}{27 d^2 f (1+\csc (e+f x))}+\frac {\cot (e+f x) (d \csc (e+f x))^{2+n}}{3 d^2 f (3+3 \csc (e+f x))^2}+\frac {2 n \cos (e+f x) (d \csc (e+f x))^{2+n} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-2-n),-\frac {n}{2},\sin ^2(e+f x)\right )}{27 d^2 f \sqrt {\cos ^2(e+f x)}}-\frac {(1+2 n) \cos (e+f x) (d \csc (e+f x))^{1+n} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-1-n),\frac {1-n}{2},\sin ^2(e+f x)\right )}{27 d f \sqrt {\cos ^2(e+f x)}} \]

output
-2/3*n*cot(f*x+e)*(d*csc(f*x+e))^(2+n)/a^2/d^2/f/(1+csc(f*x+e))+1/3*cot(f* 
x+e)*(d*csc(f*x+e))^(2+n)/d^2/f/(a+a*csc(f*x+e))^2+2/3*n*cos(f*x+e)*(d*csc 
(f*x+e))^(2+n)*hypergeom([1/2, -1-1/2*n],[-1/2*n],sin(f*x+e)^2)/a^2/d^2/f/ 
(cos(f*x+e)^2)^(1/2)-1/3*(1+2*n)*cos(f*x+e)*(d*csc(f*x+e))^(1+n)*hypergeom 
([1/2, -1/2-1/2*n],[1/2-1/2*n],sin(f*x+e)^2)/a^2/d/f/(cos(f*x+e)^2)^(1/2)
 
3.9.18.2 Mathematica [F]

\[ \int \frac {(d \csc (e+f x))^n}{(3+3 \sin (e+f x))^2} \, dx=\int \frac {(d \csc (e+f x))^n}{(3+3 \sin (e+f x))^2} \, dx \]

input
Integrate[(d*Csc[e + f*x])^n/(3 + 3*Sin[e + f*x])^2,x]
 
output
Integrate[(d*Csc[e + f*x])^n/(3 + 3*Sin[e + f*x])^2, x]
 
3.9.18.3 Rubi [A] (verified)

Time = 1.08 (sec) , antiderivative size = 228, normalized size of antiderivative = 1.03, number of steps used = 13, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.565, Rules used = {3042, 3717, 3042, 4304, 25, 3042, 4508, 3042, 4274, 3042, 4259, 3042, 3122}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {(d \csc (e+f x))^n}{(a \sin (e+f x)+a)^2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {(d \csc (e+f x))^n}{(a \sin (e+f x)+a)^2}dx\)

\(\Big \downarrow \) 3717

\(\displaystyle \frac {\int \frac {(d \csc (e+f x))^{n+2}}{(\csc (e+f x) a+a)^2}dx}{d^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int \frac {(d \csc (e+f x))^{n+2}}{(\csc (e+f x) a+a)^2}dx}{d^2}\)

\(\Big \downarrow \) 4304

\(\displaystyle \frac {\frac {\cot (e+f x) (d \csc (e+f x))^{n+2}}{3 f (a \csc (e+f x)+a)^2}-\frac {\int -\frac {(d \csc (e+f x))^{n+2} (a (1-n)+a (n+1) \csc (e+f x))}{\csc (e+f x) a+a}dx}{3 a^2}}{d^2}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\frac {\int \frac {(d \csc (e+f x))^{n+2} (a (1-n)+a (n+1) \csc (e+f x))}{\csc (e+f x) a+a}dx}{3 a^2}+\frac {\cot (e+f x) (d \csc (e+f x))^{n+2}}{3 f (a \csc (e+f x)+a)^2}}{d^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {\int \frac {(d \csc (e+f x))^{n+2} (a (1-n)+a (n+1) \csc (e+f x))}{\csc (e+f x) a+a}dx}{3 a^2}+\frac {\cot (e+f x) (d \csc (e+f x))^{n+2}}{3 f (a \csc (e+f x)+a)^2}}{d^2}\)

\(\Big \downarrow \) 4508

\(\displaystyle \frac {\frac {\frac {\int (d \csc (e+f x))^{n+2} \left (a^2 (n+1) (2 n+1)-2 a^2 n (n+2) \csc (e+f x)\right )dx}{a^2}-\frac {2 n \cot (e+f x) (d \csc (e+f x))^{n+2}}{f (\csc (e+f x)+1)}}{3 a^2}+\frac {\cot (e+f x) (d \csc (e+f x))^{n+2}}{3 f (a \csc (e+f x)+a)^2}}{d^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {\frac {\int (d \csc (e+f x))^{n+2} \left (a^2 (n+1) (2 n+1)-2 a^2 n (n+2) \csc (e+f x)\right )dx}{a^2}-\frac {2 n \cot (e+f x) (d \csc (e+f x))^{n+2}}{f (\csc (e+f x)+1)}}{3 a^2}+\frac {\cot (e+f x) (d \csc (e+f x))^{n+2}}{3 f (a \csc (e+f x)+a)^2}}{d^2}\)

\(\Big \downarrow \) 4274

\(\displaystyle \frac {\frac {\frac {a^2 (n+1) (2 n+1) \int (d \csc (e+f x))^{n+2}dx-\frac {2 a^2 n (n+2) \int (d \csc (e+f x))^{n+3}dx}{d}}{a^2}-\frac {2 n \cot (e+f x) (d \csc (e+f x))^{n+2}}{f (\csc (e+f x)+1)}}{3 a^2}+\frac {\cot (e+f x) (d \csc (e+f x))^{n+2}}{3 f (a \csc (e+f x)+a)^2}}{d^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {\frac {a^2 (n+1) (2 n+1) \int (d \csc (e+f x))^{n+2}dx-\frac {2 a^2 n (n+2) \int (d \csc (e+f x))^{n+3}dx}{d}}{a^2}-\frac {2 n \cot (e+f x) (d \csc (e+f x))^{n+2}}{f (\csc (e+f x)+1)}}{3 a^2}+\frac {\cot (e+f x) (d \csc (e+f x))^{n+2}}{3 f (a \csc (e+f x)+a)^2}}{d^2}\)

\(\Big \downarrow \) 4259

\(\displaystyle \frac {\frac {\frac {a^2 (n+1) (2 n+1) \left (\frac {\sin (e+f x)}{d}\right )^n (d \csc (e+f x))^n \int \left (\frac {\sin (e+f x)}{d}\right )^{-n-2}dx-\frac {2 a^2 n (n+2) \left (\frac {\sin (e+f x)}{d}\right )^n (d \csc (e+f x))^n \int \left (\frac {\sin (e+f x)}{d}\right )^{-n-3}dx}{d}}{a^2}-\frac {2 n \cot (e+f x) (d \csc (e+f x))^{n+2}}{f (\csc (e+f x)+1)}}{3 a^2}+\frac {\cot (e+f x) (d \csc (e+f x))^{n+2}}{3 f (a \csc (e+f x)+a)^2}}{d^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {\frac {a^2 (n+1) (2 n+1) \left (\frac {\sin (e+f x)}{d}\right )^n (d \csc (e+f x))^n \int \left (\frac {\sin (e+f x)}{d}\right )^{-n-2}dx-\frac {2 a^2 n (n+2) \left (\frac {\sin (e+f x)}{d}\right )^n (d \csc (e+f x))^n \int \left (\frac {\sin (e+f x)}{d}\right )^{-n-3}dx}{d}}{a^2}-\frac {2 n \cot (e+f x) (d \csc (e+f x))^{n+2}}{f (\csc (e+f x)+1)}}{3 a^2}+\frac {\cot (e+f x) (d \csc (e+f x))^{n+2}}{3 f (a \csc (e+f x)+a)^2}}{d^2}\)

\(\Big \downarrow \) 3122

\(\displaystyle \frac {\frac {\frac {\frac {2 a^2 n \cos (e+f x) (d \csc (e+f x))^{n+2} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-n-2),-\frac {n}{2},\sin ^2(e+f x)\right )}{f \sqrt {\cos ^2(e+f x)}}-\frac {a^2 d (2 n+1) \cos (e+f x) (d \csc (e+f x))^{n+1} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-n-1),\frac {1-n}{2},\sin ^2(e+f x)\right )}{f \sqrt {\cos ^2(e+f x)}}}{a^2}-\frac {2 n \cot (e+f x) (d \csc (e+f x))^{n+2}}{f (\csc (e+f x)+1)}}{3 a^2}+\frac {\cot (e+f x) (d \csc (e+f x))^{n+2}}{3 f (a \csc (e+f x)+a)^2}}{d^2}\)

input
Int[(d*Csc[e + f*x])^n/(a + a*Sin[e + f*x])^2,x]
 
output
((Cot[e + f*x]*(d*Csc[e + f*x])^(2 + n))/(3*f*(a + a*Csc[e + f*x])^2) + (( 
-2*n*Cot[e + f*x]*(d*Csc[e + f*x])^(2 + n))/(f*(1 + Csc[e + f*x])) + ((2*a 
^2*n*Cos[e + f*x]*(d*Csc[e + f*x])^(2 + n)*Hypergeometric2F1[1/2, (-2 - n) 
/2, -1/2*n, Sin[e + f*x]^2])/(f*Sqrt[Cos[e + f*x]^2]) - (a^2*d*(1 + 2*n)*C 
os[e + f*x]*(d*Csc[e + f*x])^(1 + n)*Hypergeometric2F1[1/2, (-1 - n)/2, (1 
 - n)/2, Sin[e + f*x]^2])/(f*Sqrt[Cos[e + f*x]^2]))/a^2)/(3*a^2))/d^2
 

3.9.18.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3122
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*(( 
b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1)*Sqrt[Cos[c + d*x]^2]))*Hypergeometric2 
F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2], x] /; FreeQ[{b, c, d, n}, x] 
 &&  !IntegerQ[2*n]
 

rule 3717
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x 
_)]^(n_.))^(p_.), x_Symbol] :> Simp[d^(n*p)   Int[(d*Csc[e + f*x])^(m - n*p 
)*(b + a*Csc[e + f*x]^n)^p, x], x] /; FreeQ[{a, b, d, e, f, m, n, p}, x] && 
  !IntegerQ[m] && IntegersQ[n, p]
 

rule 4259
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(b*Csc[c + d*x] 
)^(n - 1)*((Sin[c + d*x]/b)^(n - 1)   Int[1/(Sin[c + d*x]/b)^n, x]), x] /; 
FreeQ[{b, c, d, n}, x] &&  !IntegerQ[n]
 

rule 4274
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + 
(a_)), x_Symbol] :> Simp[a   Int[(d*Csc[e + f*x])^n, x], x] + Simp[b/d   In 
t[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]
 

rule 4304
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( 
a_))^(m_), x_Symbol] :> Simp[(-Cot[e + f*x])*(a + b*Csc[e + f*x])^m*((d*Csc 
[e + f*x])^n/(f*(2*m + 1))), x] + Simp[1/(a^2*(2*m + 1))   Int[(a + b*Csc[e 
 + f*x])^(m + 1)*(d*Csc[e + f*x])^n*(a*(2*m + n + 1) - b*(m + n + 1)*Csc[e 
+ f*x]), x], x] /; FreeQ[{a, b, d, e, f, n}, x] && EqQ[a^2 - b^2, 0] && LtQ 
[m, -1] && (IntegersQ[2*m, 2*n] || IntegerQ[m])
 

rule 4508
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( 
a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(-(A*b 
- a*B))*Cot[e + f*x]*(a + b*Csc[e + f*x])^m*((d*Csc[e + f*x])^n/(b*f*(2*m + 
 1))), x] - Simp[1/(a^2*(2*m + 1))   Int[(a + b*Csc[e + f*x])^(m + 1)*(d*Cs 
c[e + f*x])^n*Simp[b*B*n - a*A*(2*m + n + 1) + (A*b - a*B)*(m + n + 1)*Csc[ 
e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, B, n}, x] && NeQ[A*b - a*B 
, 0] && EqQ[a^2 - b^2, 0] && LtQ[m, -2^(-1)] &&  !GtQ[n, 0]
 
3.9.18.4 Maple [F]

\[\int \frac {\left (d \csc \left (f x +e \right )\right )^{n}}{\left (a +a \sin \left (f x +e \right )\right )^{2}}d x\]

input
int((d*csc(f*x+e))^n/(a+a*sin(f*x+e))^2,x)
 
output
int((d*csc(f*x+e))^n/(a+a*sin(f*x+e))^2,x)
 
3.9.18.5 Fricas [F]

\[ \int \frac {(d \csc (e+f x))^n}{(3+3 \sin (e+f x))^2} \, dx=\int { \frac {\left (d \csc \left (f x + e\right )\right )^{n}}{{\left (a \sin \left (f x + e\right ) + a\right )}^{2}} \,d x } \]

input
integrate((d*csc(f*x+e))^n/(a+a*sin(f*x+e))^2,x, algorithm="fricas")
 
output
integral(-(d*csc(f*x + e))^n/(a^2*cos(f*x + e)^2 - 2*a^2*sin(f*x + e) - 2* 
a^2), x)
 
3.9.18.6 Sympy [F]

\[ \int \frac {(d \csc (e+f x))^n}{(3+3 \sin (e+f x))^2} \, dx=\frac {\int \frac {\left (d \csc {\left (e + f x \right )}\right )^{n}}{\sin ^{2}{\left (e + f x \right )} + 2 \sin {\left (e + f x \right )} + 1}\, dx}{a^{2}} \]

input
integrate((d*csc(f*x+e))**n/(a+a*sin(f*x+e))**2,x)
 
output
Integral((d*csc(e + f*x))**n/(sin(e + f*x)**2 + 2*sin(e + f*x) + 1), x)/a* 
*2
 
3.9.18.7 Maxima [F]

\[ \int \frac {(d \csc (e+f x))^n}{(3+3 \sin (e+f x))^2} \, dx=\int { \frac {\left (d \csc \left (f x + e\right )\right )^{n}}{{\left (a \sin \left (f x + e\right ) + a\right )}^{2}} \,d x } \]

input
integrate((d*csc(f*x+e))^n/(a+a*sin(f*x+e))^2,x, algorithm="maxima")
 
output
integrate((d*csc(f*x + e))^n/(a*sin(f*x + e) + a)^2, x)
 
3.9.18.8 Giac [F]

\[ \int \frac {(d \csc (e+f x))^n}{(3+3 \sin (e+f x))^2} \, dx=\int { \frac {\left (d \csc \left (f x + e\right )\right )^{n}}{{\left (a \sin \left (f x + e\right ) + a\right )}^{2}} \,d x } \]

input
integrate((d*csc(f*x+e))^n/(a+a*sin(f*x+e))^2,x, algorithm="giac")
 
output
integrate((d*csc(f*x + e))^n/(a*sin(f*x + e) + a)^2, x)
 
3.9.18.9 Mupad [F(-1)]

Timed out. \[ \int \frac {(d \csc (e+f x))^n}{(3+3 \sin (e+f x))^2} \, dx=\int \frac {{\left (\frac {d}{\sin \left (e+f\,x\right )}\right )}^n}{{\left (a+a\,\sin \left (e+f\,x\right )\right )}^2} \,d x \]

input
int((d/sin(e + f*x))^n/(a + a*sin(e + f*x))^2,x)
 
output
int((d/sin(e + f*x))^n/(a + a*sin(e + f*x))^2, x)